package com.mentalhealthplatform.global.rbac.repository;

import com.mentalhealthplatform.global.rbac.model.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;
import java.util.UUID;

public interface BaseUserRepository extends JpaRepository<User, UUID> {
    Optional<User> findByUsername(String username);

    boolean existsByUsername(String username);

    Optional<User> findByUsernameAndIdNot(String username, UUID id);
}
